#ifndef POWER_H
#define POWER_H
#include <QWidget>
#include <QLabel>
#include <QTableWidget>
#include <QTextEdit>
#include <QPushButton>
#include <QStringList>
#include <QString>
#include <QSlider>
#include <QKeyEvent>
#include <QLabel>
#include "clickableLabel.h"
#include <QHBoxLayout>
#include <QStandardItemModel>
#include <QTableView>
#include <QLCDNumber>
#include <QTimer>
#include "tabledelegate.h"
class PowerWindow:public QWidget{
   Q_OBJECT
private:
    QTableWidget *table;
    QTableView* tableView;
    QStandardItemModel* tableModel;
    TableDelegate* tableDelegate;
    QTextEdit *textEdit;
    QLCDNumber* datetimeLCD;
    QTimer* timer;
    QPushButton* buttonAdd;
    QPushButton* buttonCal;
    QPushButton* buttonClr;
    ClickableLabel* labelAbout;
    QVBoxLayout *vbox1;
    QVBoxLayout *vbox2;
    QHBoxLayout *hbox1;
    QHBoxLayout *hbox3;
    QVBoxLayout *vbox3;
    void tableModelInit();
public:
    PowerWindow(QWidget* parent=0);
    QStringList split(const QString& str);
public slots:
    void addOneRow();
    void calPower();
    void clearAll();
    void about();
    void setDatatime();
};

#endif // POWER_H
